﻿using System;

namespace IceCS.DesignPattern.Core.CompositeEntityPattern.JavaEJB
{
    public class Client
    {
        private readonly CompositeEntity _compositeEntity = new CompositeEntity();

        public void PrintData()
        {
            foreach (string data in _compositeEntity.GetData())
            {
                Console.WriteLine($"Data : {data}");
            }
        }

        public void SetData(String data1, String data2)
        {
            _compositeEntity.SetData(data1, data2);
        }
    }
}
